package com.nw.controller;

import com.nw.entity.ReturnCargo;
import com.nw.service.ReturnCargoService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;

@RestController
@RequestMapping("returnCargo")
public class ReturnCargoController {
    @Resource
    ReturnCargoService returnCargoService;
    @RequestMapping("add")
    HashMap<String,Object> addReturnCargo(ReturnCargo returnCargo){
        HashMap<String, Object> map = returnCargoService.addReturnCargo(returnCargo);
        return map;
    }
    @RequestMapping("delete")
    HashMap<String,Object> deleteReturnCargo(ReturnCargo returnCargo){
        HashMap<String, Object> map = returnCargoService.deleteReturnCargo(returnCargo);
        return map;
    }
    @RequestMapping("queryByUser")
    HashMap<String,Object> queryReturnCargo(String returnUser){
        HashMap<String, Object> map = returnCargoService.queryReturnCargoByUser(returnUser);
        return map;
    }
}
